package Config;


import entity.User;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.*;

import java.util.ArrayList;
import java.util.List;

@RestController
@Tag(name = "用户管理", description = "用户相关API")
@RequestMapping("/api/users")
public class UserController {

    @Operation(summary = "获取用户列表")
    @GetMapping
    public List<User> getUsers() {
        List<User> users = new ArrayList<User>();
        return users;
    }

    @Operation(summary = "创建用户")
    @PostMapping
    public User createUser(
            @io.swagger.v3.oas.annotations.parameters.RequestBody(description = "用户对象")
            @RequestBody User user) {
        return user;
    }
}